package com.example.demo.pattern.strategypattern.entity;


import com.example.demo.pattern.strategypattern.behaviour.FlyBehaviour;

public class Duck {

    private FlyBehaviour flyBehaviour;

    public void performFly() {
        flyBehaviour.fly();
    }

    public void display() {
        System.out.println("display a duck.");
    }

    public void setFlyBehaviour(FlyBehaviour flyBehaviour) {
        this.flyBehaviour = flyBehaviour;
    }
}
